package com.example.sce.myapplication;

import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * 为react提供的签到的java本地接口
 * Created by liao on 18-1-23.
 */

public class ReactSignModule extends ReactContextBaseJavaModule {
    private final String FAIL = "fail";
    private final String SUCCESS = "success";

    public ReactSignModule(ReactApplicationContext reactContext) {
        super(reactContext);

//        mNetworkInterfaces = new NetworkInterfaces();
    }

    @Override
    public String getName() {
        return "SignModule";
    }

    /**
     * 西科签到
     *
     *
     * @param callback 反馈给js端的数据
     */
    @ReactMethod
    public void sign(final Callback callback) {

        String jsonBody = "{'code':'1','data':'0'}";
            callback.invoke(SUCCESS, jsonBody);

    }

}
